<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3.const常量</title>
</head>
<body>
<script>
  const PI = 3.14;
  console.log(PI)
  //1.常量必须要有初始值
  // const NAME ;
  //2.常量的值不允许修改
  // PI = 4.5;
  //3.常量要大写命名
  //4.常量也是块级作用域
  // {
  //   const PLAYER = 'UZI';
  // }
  //   console.log(PLAYER)

  //5. 对数组和对象元素的修改，不算对常量的修改
  const TEAM = ['XIAO','DADAA']
  TEAM.push('dada')
  console.log(TEAM)

  //对数组地址的修改，视为对常量的修改，是禁止的
  // TEAM = ['dadarrr']

</script>
</body>
</html>